/**
 * Created by felix on 2017/2/25.
 */
import React from 'react';
import TR from './tr';
import Extra from './extra';

function TBody({ data, cols, index, extra, isOpen, onPress }) {
    const trProps = {
        data,
        cols,
        index,
        onPress,
    };
    const exProps = {
        data,
        cols,
        component: extra,
        isOpen,
    };
    return (
        <tbody>
            <TR {...trProps} />
            {extra ? <Extra {...exProps} /> : null}
        </tbody>
    );
}

export default TBody;
